cmake_minimum_required(VERSION 3.6)
project(GeekunDB)

set(CMAKE_CXX_STANDARD 11)

set(SOURCE_FILES
        API.cpp
        API.h
        BlockHandle.cpp
        BlockHandle.h
        BlockInfo.cpp
        BlockInfo.h
        BPlusTree.cpp
        BPlusTree.h
        BufferManager.cpp
        BufferManager.h
        CatalogManager.cpp
        CatalogManager.h
        Exceptions.cpp
        Exceptions.h
        FileHandle.cpp
        FileHandle.h
        FileInfo.cpp
        FileInfo.h
        IndexManager.cpp
        IndexManager.h
        Interpreter.cpp
        Interpreter.h
        main.cpp
        RecordManager.cpp
        RecordManager.h
        SQLStatement.cpp
        SQLStatement.h
        StaticValue.h UserManager.cpp UserManager.h)

SET(BOOST_ROOT "C:\\boost_1_62_0")
SET(BOOST_INCLUDEDIR "C:\\boost_1_62_0\\include")
SET(BOOST_LIBRARYDIR "C:\\boost_1_62_0\\lib")
#set(Boost_USE_STATIC_LIBS ON)
#set(Boost_USE_MULTITHREADED ON)
#set(Boost_USE_STATIC_RUNTIME ON)

find_package(Boost 1.62.0 COMPONENTS filesystem regex system serialization REQUIRED)

if (Boost_FOUND)
    include_directories(${Boost_INCLUDE_DIRS})
    add_executable(GeekunDB ${SOURCE_FILES})
    target_link_libraries(GeekunDB ${Boost_LIBRARIES})
endif ()

